using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class education_mail_recordMap : EntityTypeConfiguration<education_mail_record>
    {
        public education_mail_recordMap()
        {
            // Primary Key
            this.HasKey(t => t.education_mail_record_id);

            // Properties
            this.Property(t => t.mail_sender)
                .HasMaxLength(20);

            this.Property(t => t.mail_receiver)
                .HasMaxLength(20);

            this.Property(t => t.mail_title)
                .HasMaxLength(20);

            this.Property(t => t.mail_receiver_address)
                .HasMaxLength(20);

            this.Property(t => t.mail_receiver_email)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("education_mail_record");
            this.Property(t => t.education_mail_record_id).HasColumnName("education_mail_record_id");
            this.Property(t => t.mail_sender).HasColumnName("mail_sender");
            this.Property(t => t.mail_send_time).HasColumnName("mail_send_time");
            this.Property(t => t.mail_receiver).HasColumnName("mail_receiver");
            this.Property(t => t.mail_receive_time).HasColumnName("mail_receive_time");
            this.Property(t => t.mail_title).HasColumnName("mail_title");
            this.Property(t => t.mail_receiver_address).HasColumnName("mail_receiver_address");
            this.Property(t => t.mail_receiver_email).HasColumnName("mail_receiver_email");
        }
    }
}
